#ifndef EGG_GLOBALGPUPROGRAMGROUP_H
#define EGG_GLOBALGPUPROGRAMGROUP_H

#include "RenderSystem.h"

namespace egg{

    class GlobalGPUProgramGroup{
    public:
        GlobalGPUProgramGroup();
    public:
        GPUProgramPtr load(const string& _name,const string& _vs,const string& _fs);

        inline GPUProgramPtr getItem(const string& _name){
            return mPrograms[_name];
        }
    protected:
        GPUProgramPtr createProgram(ShaderPtr _vs,const string& _fs);
        GPUProgramPtr createProgram(const string& _vs,const string& _fs);
        ShaderPtr createShader(const string& _fileName,ShaderType _type);
    protected:
        map<string,GPUProgramPtr> mPrograms;
    };

    extern GlobalGPUProgramGroup* gGPUProgramGroup;

}

#endif